package com.dd.cloud.user.service.order;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dd.cloud.user.entity.order.OrderFlow;
import com.dd.cloud.user.entity.order.OrderPay;
import com.dd.cloud.user.entity.product.PayParam;
import com.dd.cloud.user.req.order.CreateFlowReq;
import com.dd.cloud.user.res.order.PayOrderResponse;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 订单流水表 服务类
 * </p>
 *
 * @author czg
 * @since 2022-09-03
 */
public interface IOrderFlowService extends IService<OrderFlow> {
    /**
     * 流水退款
     *
     * @param orderPay
     * @return
     */
    void refund(OrderPay orderPay);

    /**
     * 创建流水
     *
     * @param request
     * @param req
     * @param payParam
     * @return
     */
    PayOrderResponse createFlow(HttpServletRequest request, CreateFlowReq req, PayParam payParam);

    /**
     * 重新支付流水
     *
     * @param request
     * @param flowReq
     * @param payParam
     * @return
     */
    PayOrderResponse payUnpayFlow(HttpServletRequest request, CreateFlowReq flowReq, PayParam payParam);

    /**
     * 获取流水信息
     *
     * @param flowNo
     * @return
     */
    OrderFlow getOrderFlow(String flowNo);
}
